summaryrefslogtreecommitdiff
path: root/website/src/pages/microlog/[...slug].astro
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-06-18 19:21:59 +0100
committerJoe Carstairs <me@joeac.net>2026-06-18 19:21:59 +0100
commitca8e6824eaa711105f4092365792720c9dde026b (patch)
tree2b6493941352d11b799ee63d3f1311c13de649b8 /website/src/pages/microlog/[...slug].astro
parenta0f25057283a397f006127b6f582d190d2c4294e (diff)
remove Astro website
Diffstat (limited to 'website/src/pages/microlog/[...slug].astro')
-rw-r--r--website/src/pages/microlog/[...slug].astro26
1 files changed, 0 insertions, 26 deletions
diff --git a/website/src/pages/microlog/[...slug].astro b/website/src/pages/microlog/[...slug].astro
deleted file mode 100644
index 69c94b0..0000000
--- a/website/src/pages/microlog/[...slug].astro
+++ /dev/null
@@ -1,26 +0,0 @@
----
-import { type CollectionEntry, getCollection, render } from 'astro:content';
-import MicrologPost from '../../layouts/MicrologPost.astro';
-import { renderGemtextToHtml } from '../../renderGemtextToHtml';
-
-export async function getStaticPaths() {
- const posts = await getCollection('microlog');
- return posts.map((post) => ({
- params: { slug: post.id },
- props: post,
- }));
-}
-type Props = CollectionEntry<'microlog'>;
-
-const { id: slug, body } = Astro.props;
-const pubDateStr = slug.replaceAll(/\.[0-9]+/g, '');
-const pubDate = new Date(pubDateStr);
-if (isNaN(pubDate.valueOf())) {
- throw new Error(`Could not construct a valid publication date for microlog post: ${slug}`);
-}
-const Content = renderGemtextToHtml(body ?? '', pubDateStr);
----
-
-<MicrologPost pubDate={pubDate} title={pubDateStr}>
- <Fragment set:html={Content}></Fragment>
-</MicrologPost>